<template>
  <div>
    <h1>demo</h1>
    <input type="text" v-model="num">
    <comp1 :num="num" @yaotang="geitang"></comp1>
  </div>
</template>

<script>
import comp1 from '@/components/comp1'

  export default {
    name: "Demo.vue",
    components: {comp1: comp1},
    data() {
      return {
        num: '1'
      }
    },
    methods: {
      geitang(new_num) {
        this.num = new_num
      },
    },
  }
</script>

<style scoped>

</style>